//
//  BaseNavigationController.m
//  Display
//
//  Created by zhu yuanbin on 6/24/16.
//  Copyright © 2016 zhuyuanbin. All rights reserved.
//

#import "BaseNavigationController.h"

@implementation BaseNavigationController

-(void)viewDidLoad
{
    [super viewDidLoad];
    for (UIView *v in self.navigationBar.subviews)
    {
        NSLog(@"%@", v.description);
        
        if ([v isKindOfClass:NSClassFromString(@"_UINavigationBarBackground")])
        {
            UIImage *img = [UIImage imageNamed:@"nav"];
            UIImageView *bg = [[UIImageView alloc] initWithImage:img];
            bg.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 84);
            [v addSubview:bg];
        }
    }
}
@end
